//
//  ComData.m
//  torycoupon
//
//  Created by 이 민우 on 13. 4. 19..
//  Copyright (c) 2013년 manytory. All rights reserved.
//

#import "ComData.h"

@implementation ComData

NSString *shareStringData[SHARE_DATA_MAX] = {
    @"http://www.manytory.com/torycoupon/",
};

+ (void)setPushKey:(NSString *)strVal {
    NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
	[prefs setObject:(NSString *)strVal forKey:@"torycoupon_pushkey"];
	[prefs synchronize];
}

+ (NSString*)getPushKey {
    NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
	NSString * strVal = [prefs objectForKey:@"torycoupon_pushkey"];
	return strVal;
}

// BUTTON
+(UIButton *)AddCustomButton:(id)target text:(NSString *)text setRect:(CGRect)rect image:(UIImage *)image {
    UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:rect];
    [button setImage:image forState:UIControlStateNormal];
    [button setTitle:text forState:UIControlStateNormal];
    [target addSubview:button];
    return button;
}

+(UIButton *)AddRoundButton:(id)target text:(NSString *)text setRect:(CGRect)rect {
    UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [button setFrame:rect];
    [button setTitle:text forState:UIControlStateNormal];
    [target addSubview:button];
    return button;
}

@end
